var ListNode.head:ListNode?
    get() = saveHead
    set(value) {
        saveHead=value
    }
var saveHead:ListNode?=null

val String.max:Int
    get()=5

fun main() {
    val node=ListNode(1).apply {
        head=ListNode(0)
        next=ListNode(2)

    }
    val node1=ListNode(4).apply {
        head=ListNode(3)
        next=ListNode(5)
    }
    println(node.head?.`val`)
    println(node.next?.`val`)
    println(node1.head?.`val`)
    println(node1.next?.`val`)
}